package com.mapforge.filechooser;

import java.io.File;

import com.mapforge.io.DefaultTilesetIOHandler;
import com.mapforge.io.IOHandlerInterface;
import com.mapforge.map.Tileset;

public class ImageAndTilesetFilter extends IOHandlerFileFilter<Tileset> {

	private ImageFileFilter imgFileFilter;

	public ImageAndTilesetFilter() {
		this(new DefaultTilesetIOHandler());
	}

	public ImageAndTilesetFilter(IOHandlerInterface<Tileset> tilesetIO) {
		super(tilesetIO, "Image Files and .tset");
		imgFileFilter = new ImageFileFilter();
	}

	public boolean accept(File f) {
		return f.isDirectory() || super.accept(f) || imgFileFilter.accept(f);
	}
}
